import { get } from '@/utils/request'

// 添加用户
export const addUser = userinfo => {
    return post('/api/foods', userinfo)
}

// 分页获取数据
export const getUserList = (page = 1) => {
    return get('/api/foods?page=' + page)
}

// 删除用户
export const deleteUser = (id = 0) => {
    return remove('/api/foods/' + id)
}

// 根据id返回对的用户信息
export const getUserInfo = (id = 0) => {
    return get('/api/foods/' + id)
}

// 修改用户
export const putUserInfo = (id = 0) => {
    return put('/api/foods/' + id)
}


